home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
mint
/
filesys
/
mfs609s.zoo
/
mount.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-11-27
|
595b
|
37 lines
/* Very quick hack MFS_(U)MOUNT interface.
* written by S N Henson, 1993.
*/
#include <mintbind.h>
#include <stdio.h>
#include <string.h>
struct {
unsigned short dev;
long flags;
long reserved[4];
} mnt;
#define MFS_MOUNT 0x10c
#define MFS_UMOUNT 0x10d
main(argc,argv)
int argc;
char **argv;
{
if(argc!=3) exit(1);
if(!strcmp(argv[1],"-u"))
{
printf("mount returned %d\n",Dcntl(MFS_UMOUNT,argv[2],0));
exit(0);
}
mnt.dev = (argv[2][0] & ~32) -'A';
mnt.flags = 0;
printf("umount returned %d\n",Dcntl(MFS_MOUNT,argv[1],&mnt));
exit(0);
}